package partner;
import db.RandomGenerator;

import java.util.Date;

@Table(name = "tbl_xyz")
public class BeanXyz {

    @FieldDes(colName = "colStr", colDatalength = 20,colDataType = "varchar")
    private String aStr;

    @FieldDes(colName = "colInt",colDataType = "integer")
    private int aInt;

    @FieldDes(colName = "colFloat",colDataType = "float")
    private float aFloat;

    @FieldDes(colName = "colDate",colDataType = "date")
    private Date aDate;

    @FieldDes(colName = "colBool",colDataType = "boolean")
    private boolean aBool;

    public BeanXyz() {
        super();
    }
    public BeanXyz(String aStr, int aInt, float aFloat, Date aDate, boolean aBool) {
        this.aStr = aStr;
        this.aInt = aInt;
        this.aFloat = aFloat;
        this.aDate = aDate;
        this.aBool = aBool;
    }

    public static BeanXyz genRandomBean() {
        String s = RandomGenerator.randomString(4);
        int i = RandomGenerator.randomInt(1,10);
        float f = RandomGenerator.randomFloat(1,10);
        Date d = RandomGenerator.randomDate(null, null);
        boolean b = RandomGenerator.randomBool();
        //
        return new BeanXyz(s,i,f,d,b);
    }

    public String getaStr() {
        return aStr;
    }
    public void setaStr(String aStr) {
        this.aStr = aStr;
    }
    public int getaInt() {
        return aInt;
    }
    public void setaInt(int aInt) {
        this.aInt = aInt;
    }
    public float getaFloat() {
        return aFloat;
    }
    public void setaFloat(float aFloat) {
        this.aFloat = aFloat;
    }
    public Date getaDate() {
        return aDate;
    }
    public void setaDate(Date aDate) {
        this.aDate = aDate;
    }
    public boolean isaBool() {
        return aBool;
    }
    public void setaBool(boolean aBool) {
        this.aBool = aBool;
    }
}
